//
//  TAMTTextNewsCell.swift
//  TAMeetApp
//
//  Created by 九月 on 12/5/24.
//

import UIKit

class TAMTTextNewsCell: TAMTBaseNewCell {
    
    lazy var textbgView:UIView = {
        let sub = UIView()
        sub.layer.cornerRadius = 8
        sub.layer.masksToBounds = true
        return sub
    }()
    
    lazy var textLabel:UILabel = {
        let sub = UILabel()
        sub.textColor = UIColor(hex: "#ffffff")
        sub.font = .systemFont(ofSize: 11, weight: .regular)
        return sub
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        contentView.addSubview(textbgView)
        contentView.addSubview(textLabel)
        
        avatarView.image = UIImage(named: "bg")
        avatarView.left = 12
        avatarView.top = 12
        
        nameLabel.text = "九月"
        nameLabel.textAlignment = .left
        nameLabel.left = avatarView.right + 8
        nameLabel.top = avatarView.top
        nameLabel.width = 100
        
        sexLabel.text = "12"
        
        sexBtn.left = nameLabel.left
        sexBtn.top = avatarView.bottom - 2 - sexBtn.height
    }
    
    override var message: TAMTMeeage! {
        didSet {
            super.message = message // 调用父类的 `didSet`
            print("SubClass: message was set to \(message.content)")
            // 可以在这里添加额外的逻辑
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
